import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
// let defuCify = localStorage.city || "天津";
// try {
//     if (localStorage.city) {
//         defuCify = localStorage.city
//     }
// } catch (e) {

// }
export default new Vuex.Store({
    state: { 
        city:localStorage.city || "天津"
    },
    mutations: {
        changCity(state, kewVal) {
            state.city = kewVal
        }
    },
    actions: {
        changCity(context, kewVal) {
            context.commit('changCity', kewVal)
        }
    },
    modules: {
    }
})
